﻿namespace NEvoWeb.Modules.NB_Store
{
    using DotNetNuke.Entities.Modules;
    using DotNetNuke.Services.Exceptions;
    using DotNetNuke.Services.Localization;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Runtime.CompilerServices;
    using System.Web.UI;
    using System.Web.UI.WebControls;

    public class MiniCartSettings : BaseModuleSettings
    {
        [AccessedThroughProperty("chkAllowEdit")]
        private CheckBox _chkAllowEdit;
        [AccessedThroughProperty("chkHideDescriptionCol")]
        private CheckBox _chkHideDescriptionCol;
        [AccessedThroughProperty("chkHideHeader")]
        private CheckBox _chkHideHeader;
        [AccessedThroughProperty("chkHidePriceCol")]
        private CheckBox _chkHidePriceCol;
        [AccessedThroughProperty("chkHideQtyCol")]
        private CheckBox _chkHideQtyCol;
        [AccessedThroughProperty("chkHideRemoveCol")]
        private CheckBox _chkHideRemoveCol;
        [AccessedThroughProperty("chkHideTotal")]
        private CheckBox _chkHideTotal;
        [AccessedThroughProperty("chkHideTotalCol")]
        private CheckBox _chkHideTotalCol;
        [AccessedThroughProperty("chkShowDiscountCol")]
        private CheckBox _chkShowDiscountCol;
        [AccessedThroughProperty("chkShowFullCart")]
        private CheckBox _chkShowFullCart;
        [AccessedThroughProperty("ddlEmptyTemplate")]
        private DropDownList _ddlEmptyTemplate;
        [AccessedThroughProperty("ddlFullTemplate")]
        private DropDownList _ddlFullTemplate;
        [AccessedThroughProperty("ddlMiniPosition")]
        private DropDownList _ddlMiniPosition;
        [AccessedThroughProperty("plAllowEdit")]
        private UserControl _plAllowEdit;
        [AccessedThroughProperty("plEmptyTemplate")]
        private UserControl _plEmptyTemplate;
        [AccessedThroughProperty("plFullTemplate")]
        private UserControl _plFullTemplate;
        [AccessedThroughProperty("plHideDescriptionCol")]
        private UserControl _plHideDescriptionCol;
        [AccessedThroughProperty("plHideHeader")]
        private UserControl _plHideHeader;
        [AccessedThroughProperty("plHidePriceCol")]
        private UserControl _plHidePriceCol;
        [AccessedThroughProperty("plHideQtyCol")]
        private UserControl _plHideQtyCol;
        [AccessedThroughProperty("plHideRemoveCol")]
        private UserControl _plHideRemoveCol;
        [AccessedThroughProperty("plHideTotal")]
        private UserControl _plHideTotal;
        [AccessedThroughProperty("plHideTotalCol")]
        private UserControl _plHideTotalCol;
        [AccessedThroughProperty("plMiniPosition")]
        private UserControl _plMiniPosition;
        [AccessedThroughProperty("plShowDiscountCol")]
        private UserControl _plShowDiscountCol;
        [AccessedThroughProperty("plShowFullCart")]
        private UserControl _plShowFullCart;

        public override void LoadSettings()
        {
            try
            {
                if (!this.Page.IsPostBack)
                {
                    if (this.ModuleSettings.Count == 0)
                    {
                        this.DoReset();
                    }
                    SharedFunctions.populateTemplateList(this.PortalId, this.ddlEmptyTemplate, ".template", "", "", "");
                    SharedFunctions.populateTemplateList(this.PortalId, this.ddlFullTemplate, ".template", "", "", "");
                    SharedFunctions.populateDropDownList(this.ddlMiniPosition, DotNetNuke.Services.Localization.Localization.GetString("MiniPositionName", this.LocalResourceFile));
                    ListItem item = new ListItem {
                        Value = "",
                        Text = ""
                    };
                    this.ddlEmptyTemplate.Items.Insert(0, item);
                    item = new ListItem {
                        Value = "",
                        Text = ""
                    };
                    this.ddlFullTemplate.Items.Insert(0, item);
                    this.LoadBaseSettings();
                }
            }
            catch (Exception exception1)
            {
                ProjectData.SetProjectError(exception1);
                Exception exc = exception1;
                DotNetNuke.Services.Exceptions.Exceptions.ProcessModuleLoadException((PortalModuleBase) this, exc);
                ProjectData.ClearProjectError();
            }
        }

        public override void UpdateSettings()
        {
            try
            {
                this.UpdateBaseSettings();
            }
            catch (Exception exception1)
            {
                ProjectData.SetProjectError(exception1);
                Exception exc = exception1;
                DotNetNuke.Services.Exceptions.Exceptions.ProcessModuleLoadException((PortalModuleBase) this, exc);
                ProjectData.ClearProjectError();
            }
        }

        protected virtual CheckBox chkAllowEdit
        {
            get
            {
                return this._chkAllowEdit;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._chkAllowEdit = value;
            }
        }

        protected virtual CheckBox chkHideDescriptionCol
        {
            get
            {
                return this._chkHideDescriptionCol;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._chkHideDescriptionCol = value;
            }
        }

        protected virtual CheckBox chkHideHeader
        {
            get
            {
                return this._chkHideHeader;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._chkHideHeader = value;
            }
        }

        protected virtual CheckBox chkHidePriceCol
        {
            get
            {
                return this._chkHidePriceCol;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._chkHidePriceCol = value;
            }
        }

        protected virtual CheckBox chkHideQtyCol
        {
            get
            {
                return this._chkHideQtyCol;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._chkHideQtyCol = value;
            }
        }

        protected virtual CheckBox chkHideRemoveCol
        {
            get
            {
                return this._chkHideRemoveCol;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._chkHideRemoveCol = value;
            }
        }

        protected virtual CheckBox chkHideTotal
        {
            get
            {
                return this._chkHideTotal;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._chkHideTotal = value;
            }
        }

        protected virtual CheckBox chkHideTotalCol
        {
            get
            {
                return this._chkHideTotalCol;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._chkHideTotalCol = value;
            }
        }

        protected virtual CheckBox chkShowDiscountCol
        {
            get
            {
                return this._chkShowDiscountCol;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._chkShowDiscountCol = value;
            }
        }

        protected virtual CheckBox chkShowFullCart
        {
            get
            {
                return this._chkShowFullCart;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._chkShowFullCart = value;
            }
        }

        protected virtual DropDownList ddlEmptyTemplate
        {
            get
            {
                return this._ddlEmptyTemplate;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._ddlEmptyTemplate = value;
            }
        }

        protected virtual DropDownList ddlFullTemplate
        {
            get
            {
                return this._ddlFullTemplate;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._ddlFullTemplate = value;
            }
        }

        protected virtual DropDownList ddlMiniPosition
        {
            get
            {
                return this._ddlMiniPosition;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._ddlMiniPosition = value;
            }
        }

        protected virtual UserControl plAllowEdit
        {
            get
            {
                return this._plAllowEdit;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._plAllowEdit = value;
            }
        }

        protected virtual UserControl plEmptyTemplate
        {
            get
            {
                return this._plEmptyTemplate;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._plEmptyTemplate = value;
            }
        }

        protected virtual UserControl plFullTemplate
        {
            get
            {
                return this._plFullTemplate;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._plFullTemplate = value;
            }
        }

        protected virtual UserControl plHideDescriptionCol
        {
            get
            {
                return this._plHideDescriptionCol;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._plHideDescriptionCol = value;
            }
        }

        protected virtual UserControl plHideHeader
        {
            get
            {
                return this._plHideHeader;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._plHideHeader = value;
            }
        }

        protected virtual UserControl plHidePriceCol
        {
            get
            {
                return this._plHidePriceCol;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._plHidePriceCol = value;
            }
        }

        protected virtual UserControl plHideQtyCol
        {
            get
            {
                return this._plHideQtyCol;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._plHideQtyCol = value;
            }
        }

        protected virtual UserControl plHideRemoveCol
        {
            get
            {
                return this._plHideRemoveCol;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._plHideRemoveCol = value;
            }
        }

        protected virtual UserControl plHideTotal
        {
            get
            {
                return this._plHideTotal;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._plHideTotal = value;
            }
        }

        protected virtual UserControl plHideTotalCol
        {
            get
            {
                return this._plHideTotalCol;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._plHideTotalCol = value;
            }
        }

        protected virtual UserControl plMiniPosition
        {
            get
            {
                return this._plMiniPosition;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._plMiniPosition = value;
            }
        }

        protected virtual UserControl plShowDiscountCol
        {
            get
            {
                return this._plShowDiscountCol;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._plShowDiscountCol = value;
            }
        }

        protected virtual UserControl plShowFullCart
        {
            get
            {
                return this._plShowFullCart;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._plShowFullCart = value;
            }
        }
    }
}

